package de.fuberlin.kosmik.gui.view;

import android.content.Context;
import android.graphics.drawable.Drawable;
import de.fuberlin.kosmik.R;
import de.fuberlin.kosmik.data.dao.Poi;
import org.mapsforge.android.maps.GeoPoint;
import org.mapsforge.android.maps.ItemizedOverlay;
import org.mapsforge.android.maps.OverlayItem;


public class OverlayPoiItem extends OverlayItem {

	/**
	 * The underlying DAO object which contains data base
	 * information for this Poi.
	 */
	public Poi poi;

	/**
	 * Constructor.
	 *
	 * @param context The {@link Context} from which the object is created.
	 * @param poi {@link Poi} object as created from the {@link de.fuberlin.kosmik.data.DataBaseConnector} or
	 * through a {@link de.fuberlin.kosmik.data.dao.TrackData} object
	 */
	public OverlayPoiItem(Poi poi, Context context){
		super(new GeoPoint(poi.lat,poi.lng),"","");

		Drawable d = ItemizedOverlay.boundCenterBottom(context.getResources().getDrawable(R.drawable.sun_icon));
		setMarker(d);
		this.poi = poi;
	}

}
